# -*- coding: utf-8 -*-
"""
Created on Fri Jan 15 22:06:36 2021

@author: 10365
"""

import sqlGeneratorCore
import loadJsonInfo



if __name__ == "__main__":
    fileName1 = './src/fundbase_tableinfo.json'
    fileName2 = './src/fundcode_search.json'
    tableInfo = loadJsonInfo.loadTableInfoFromJson(fileName1)
    loadJsonInfo.loadTableDataFromJson(fileName2,tableInfo)
    sql = sqlGeneratorCore.genInsertSql(tableInfo)
    outputFileName = './output/' + tableInfo.tableName + '.sql'
    sqlGeneratorCore.saveSql(outputFileName,sql)
    
        
    
